<?
define('BASEPATH', true);
include('../inc/config.php');

$id = $db->EscapeString($_GET['url']);

$sit = $db->FetchArray($db->Query("SELECT id,facebook,cpc FROM `facebook` WHERE `id`='".$id."'"));
if($sit['facebook'] != ""){
?>
<html>
<head><title>Exchanger</title>
<style type="text/css">
body {
	background-color: transparent;
	margin: 0;
	padding: 0;
	text-align: center;
	}
</style></head><body>
<div id="fb-root"></div>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<script type="text/javascript">
FB.init({ status: true, cookie: true, xfbml: true }); function likeme(){ if (typeof parent.click_callback == 'function') setTimeout('parent.click_callback("<?=$sit['id']?>", "<?=$sit['cpc']?>")',1000); } FB.Event.subscribe('edge.create',likeme); 
</script>
<fb:like href="<?=$sit['facebook']?>" send="false" layout="button_count" show_faces="true" font=""></fb:like>
</body>
</html><?}?>